#pragma once

struct Ray_t;
struct player_info_t;
class C_BaseEntity;
struct VMatrix;
struct BoneVector;
struct BonePtr;
struct RadarPlayer;
struct RadarClass;
struct ModelStringStruct;
struct cplane_t;
struct csurface_t;
class CUserCmd;
class CVerifiedUserCmd;
class CInput;
class CGlobalVarsBase;
class CBaseHandle;
class IClientEntityList;
class IVEngineClient;
class IEngineTrace;
struct ClientClass;
class IBaseClientDLL;
class CBaseCombatWeapon;
class CTraceFilterSkipTwoEntities;
class CBaseTrace;
class IClientRenderable;
class CGameTrace;
#define trace_t CGameTrace


template<typename T> inline T* MakePointerGEN( PVOID thisptr, int offset ) { return reinterpret_cast<T*>( reinterpret_cast<UINT_PTR>( thisptr ) + offset ); }



// replay
#define REPLAY_GETGLOBALVARS			13

// input
#define INPUT_GETUSERCMD				8

// client
#define CLIENT_INIT						0
#define CLIENT_IN_KEYEVENT				20
#define CLIENT_CREATEMOVE				21
#define CLIENT_FRAMESTAGENOTIFY			35

// engine
#define ENGINE_CLIENTCMD_UNRESTRICTED	106
#define ENGINESOUND_EMITSOUND			4
#define MODELRENDER_DRAWMODELEXECUTE	19

// panel
#define PANEL_GETNAME					35
#define PANEL_PAINTTRAVERSE				40

//surface
#define SURFACE_DRAWSETCOLOUR			11
#define SURFACE_DRAWFILLEDRECT			12
#define SURFACE_DRAWOUTLINEDRECT		14
#define SURFACE_DRAWLINE				15
#define SURFACE_DRAWSETTEXTFONT			17
#define SURFACE_DRAWSETTEXTCOLOUR		19
#define SURFACE_DRAWSETTEXTPOS			20
#define SURFACE_DRAWPRINTTEXT			22
#define SURFACE_CREATEFONT				65
#define SURFACE_SETFONTGLYPHSET			66
#define SURFACE_GETTEXTSIZE				73
#define SURFACE_DRAWOUTLINEDCIRCLE		97
#define SURFACE_DRAWCOLOREDCIRCLE		142
// =================================================

//////////////////////////////////////////////////////////////////////////
// Bones

#define BONE_PELVIS			0
#define BONE_L_THIGH		1
#define BONE_L_CALF			2
#define BONE_L_FOOT			3
#define BONE_L_TOE			4
#define BONE_R_THIGH		5
#define BONE_R_CALF			6
#define BONE_R_FOOT			7
#define BONE_R_TOE			8
#define BONE_SPINE0			9
#define BONE_SPINE1			10
#define BONE_SPINE2			11
#define BONE_SPINE3			12
#define BONE_NECK			13
#define BONE_HEAD			14
#define BONE_L_CLAVICLE		15
#define BONE_L_UPPERARM		16
#define BONE_L_FOREARM		17
#define BONE_L_HAND			18
#define BONE_L_FINGER2_0	19
#define BONE_L_FINGER2_1	20
#define BONE_L_FINGER2_2	21
#define BONE_L_FINGER1_0	22
#define BONE_L_FINGER1_1	23
#define BONE_L_FINGER1_2	24
#define BONE_L_FINGER0_0	25
#define BONE_L_FINGER0_1	26
#define BONE_L_FINGER0_2	27
#define BONE_R_CLAVICLE		28
#define BONE_R_UPPERARM		29
#define BONE_R_FOREARM		30
#define BONE_R_HAND			31
#define BONE_R_FINGER2_0	32
#define BONE_R_FINGER2_1	33
#define BONE_R_FINGER2_2	34
#define BONE_R_FINGER1_0	35
#define BONE_R_FINGER1_1	36
#define BONE_R_FINGER1_2	37
#define BONE_R_FINGER0_0	38
#define BONE_R_FINGER0_1	39
#define BONE_R_FINGER0_2	40
#define BONE_R_WRIST		41
#define BONE_L_WRIST		42
#define BONE_L_ULNA			43
#define BONE_R_ULNA			44
#define BONE_WEAPON_BONE	45
#define BONE_WEAPON_BONE_RIGHTHAND	46
#define BONE_WEAPON_BONE_LEFTHAND	47
#define BONE_WEAPON_BONE_CLIP		48
#define BONE_FORWARD				49

const BYTE TeamT = 2;																// T Team
const BYTE TeamCT = 3;																// CT Team
const BYTE TeamSpec = 0;															// Spectator

#define	FL_ONGROUND					(1 << 0)

#define IN_ATTACK					(1 << 0)
#define IN_JUMP						(1 << 1)
#define IN_DUCK						(1 << 2)
#define IN_FORWARD					(1 << 3)
#define IN_BACK						(1 << 4)
#define IN_USE						(1 << 5)
#define IN_CANCEL					(1 << 6)
#define IN_LEFT						(1 << 7)
#define IN_RIGHT					(1 << 8)
#define IN_MOVELEFT					(1 << 9)
#define IN_MOVERIGHT				(1 << 10)
#define IN_ATTACK2					(1 << 11)
#define IN_RUN						(1 << 12)
#define IN_RELOAD					(1 << 13)
#define IN_ALT1						(1 << 14)
#define IN_ALT2						(1 << 15)
#define IN_SCORE					(1 << 16)
#define IN_SPEED					(1 << 17)
#define IN_WALK						(1 << 18)
#define IN_ZOOM						(1 << 19)
#define IN_WEAPON1					(1 << 20)
#define IN_WEAPON2					(1 << 21)
#define IN_BULLRUSH					(1 << 22)

#define	CONTENTS_SOLID			0x1
#define	CONTENTS_WINDOW			0x2
#define CONTENTS_MOVEABLE		0x4000
#define	CONTENTS_MONSTER		0x2000000
#define	CONTENTS_DEBRIS			0x4000000
#define CONTENTS_HITBOX			0x40000000
#define	CONTENTS_MONSTERCLIP	0x20000
#define	CONTENTS_GRATE			0x8
#define MASK_NPCWORLDSTATIC			(CONTENTS_SOLID|CONTENTS_WINDOW|CONTENTS_MONSTERCLIP|CONTENTS_GRATE)
#define	MASK_SHOT	(CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_HITBOX)

//////////////////////////////////////////////////////////////////////////

typedef void* (*CreateInterfaceFn)(const char *pName, int *pReturnCode);

enum WeaponIds
{
	Base = 0,
	P228,
	Glock,
	Scout,
	HEGrenade,
	XM1014,
	C4,
	MAC10,
	Aug,
	SmokeGrenade,
	Elite,
	FiveSeven,
	UMP45,
	SG550,
	Galil,
	Famas,
	USP,
	AWP,
	MP5Navy,
	M249,
	M3,
	M4A1,
	TMP,
	G3SG1,
	Flashbang,
	Deagle,
	SG552,
	AK47,
	Knife,
	P90    
};


#define DISPSURF_FLAG_SURFACE		(1<<0)
#define DISPSURF_FLAG_WALKABLE		(1<<1)
#define DISPSURF_FLAG_BUILDABLE		(1<<2)
#define DISPSURF_FLAG_SURFPROP1		(1<<3)
#define DISPSURF_FLAG_SURFPROP2		(1<<4)




namespace Offsets
{
	int m_iTeamNum;
	int m_lifeState;
	int m_iHealth;
	int m_fFlags;
	int m_ArmorValue;
	int m_hActiveWeapon;
	int m_vecViewOffset;
	int m_vecOrigin;
	int m_vecVelocity;
	int m_iFOV;
	int m_vecPunchAngle;
};













